<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      Going Beyond BLFS
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-2020-04-02">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 2020-04-02
      </h4>
      <h3>
        Chapter&nbsp;2.&nbsp;Important Information
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="locale-issues.html" title=
          "Locale Related Issues">Prev</a>
          <p>
            Locale Related Issues
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="../postlfs/postlfs.html" title=
          "Post LFS Configuration and Extra Software">Next</a>
          <p>
            Post LFS Configuration and Extra Software
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="important.html" title=
          "Chapter&nbsp;2.&nbsp;Important Information">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="beyond" name="beyond"></a>Going Beyond BLFS
      </h1>
      <p>
        The packages that are installed in this book are only the tip of the
        iceberg. We hope that the experience you gained with the LFS book and
        the BLFS book will give you the background needed to compile, install
        and configure packages that are not included in this book.
      </p>
      <p>
        When you want to install a package to a location other than
        <code class="filename">/</code>, or <code class=
        "filename">/usr</code>, you are installing outside the default
        environment settings on most machines. The following examples should
        assist you in determining how to correct this situation. The examples
        cover the complete range of settings that may need updating, but they
        are not all needed in every situation.
      </p>
      <div class="itemizedlist">
        <ul>
          <li class="listitem">
            <p>
              Expand the <code class="envar">PATH</code> to include
              <code class="filename">$PREFIX/bin</code>.
            </p>
          </li>
          <li class="listitem">
            <p>
              Expand the <code class="envar">PATH</code> for <code class=
              "systemitem">root</code> to include <code class=
              "filename">$PREFIX/sbin</code>.
            </p>
          </li>
          <li class="listitem">
            <p>
              Add <code class="filename">$PREFIX/lib</code> to <code class=
              "filename">/etc/ld.so.conf</code> or expand <code class=
              "envar">LD_LIBRARY_PATH</code> to include it. Before using the
              latter option, check out <a class="ulink" href=
              "http://xahlee.org/UnixResource_dir/_/ldpath.html">http://xahlee.org/UnixResource_dir/_/ldpath.html</a>.
              If you modify <code class="filename">/etc/ld.so.conf</code>,
              remember to update <code class=
              "filename">/etc/ld.so.cache</code> by executing <span class=
              "command"><strong>ldconfig</strong></span> as the <code class=
              "systemitem">root</code> user.
            </p>
          </li>
          <li class="listitem">
            <p>
              Add <code class="filename">$PREFIX/man</code> to <code class=
              "filename">/etc/man_db.conf</code> or expand <code class=
              "envar">MANPATH</code>.
            </p>
          </li>
          <li class="listitem">
            <p>
              Add <code class="filename">$PREFIX/info</code> to <code class=
              "envar">INFOPATH</code>.
            </p>
          </li>
          <li class="listitem">
            <p>
              Add <code class="filename">$PREFIX/lib/pkgconfig</code> to
              <code class="envar">PKG_CONFIG_PATH</code>. Some packages are
              now installing <code class="filename">.pc</code> files in
              <code class="filename">$PREFIX/share/pkgconfig</code>, so you
              may have to include this directory also.
            </p>
          </li>
          <li class="listitem">
            <p>
              Add <code class="filename">$PREFIX/include</code> to
              <code class="envar">CPPFLAGS</code> when compiling packages
              that depend on the package you installed.
            </p>
          </li>
          <li class="listitem">
            <p>
              Add <code class="filename">$PREFIX/lib</code> to <code class=
              "envar">LDFLAGS</code> when compiling packages that depend on a
              library installed by the package.
            </p>
          </li>
        </ul>
      </div>
      <p>
        If you are in search of a package that is not in the book, the
        following are different ways you can search for the desired package.
      </p>
      <div class="itemizedlist">
        <ul>
          <li class="listitem">
            <p>
              If you know the name of the package, then search Freecode for
              it at <a class="ulink" href=
              "http://freecode.com/">http://freecode.com/</a>. Also search
              Google at <a class="ulink" href=
              "http://google.com/">http://google.com/</a>. Sometimes a search
              for the <code class="filename">rpm</code> at <a class="ulink"
              href="http://rpmfind.net/">http://rpmfind.net/</a> or the
              <code class="filename">deb</code> at <a class="ulink" href=
              "http://www.debian.org/distrib/packages#search_packages">http://www.debian.org/distrib/packages#search_packages</a>
              can also lead to a link to the package.
            </p>
          </li>
          <li class="listitem">
            <p>
              If you know the name of the executable, but not the package
              that the executable belongs to, first try a Google search with
              the name of the executable. If the results are overwhelming,
              try searching for the given executable in the Debian repository
              at <a class="ulink" href=
              "http://www.debian.org/distrib/packages#search_contents">http://www.debian.org/distrib/packages#search_contents</a>.
            </p>
          </li>
        </ul>
      </div>
      <p>
        Some general hints on handling new packages:
      </p>
      <div class="itemizedlist">
        <ul>
          <li class="listitem">
            <p>
              Many of the newer packages follow the <span class=
              "command"><strong>./configure &amp;&amp; make &amp;&amp; make
              install</strong></span> process. Help on the options accepted
              by configure can be obtained via the command <span class=
              "command"><strong>./configure --help</strong></span>.
            </p>
          </li>
          <li class="listitem">
            <p>
              Most of the packages contain documentation on compiling and
              installing the package. Some of the documents are excellent,
              some not so excellent. Check out the homepage of the package
              for any additional and updated hints for compiling and
              configuring the package.
            </p>
          </li>
          <li class="listitem">
            <p>
              If you are having a problem compiling the package, try
              searching the LFS archives at <a class="ulink" href=
              "http://www.linuxfromscratch.org/search.html">http://www.linuxfromscratch.org/search.html</a>
              for the error or if that fails, try searching Google. Often, a
              distribution will have already solved the problem (many of them
              use development versions of packages, so they see the changes
              sooner than those of us who normally use stable released
              versions). But be cautious - all builders tend to carry patches
              which are no longer necessary, and to have fixes which are only
              required because of their particular choices in how they build
              a package. You may have to search deeply to find a fix for the
              package version you are trying to use, or even to find the
              package (names are sometimes not what you might expect, e.g.
              <span class="application">ghostscript</span> often has a prefix
              or a suffix in its name), but the following notes might help,
              particularly for those who, like the editors, are trying to
              build the latest versions and encountering problems:
            </p>
            <div class="itemizedlist">
              <ul>
                <li class="listitem">
                  <p>
                    Arch <a class="ulink" href=
                    "http://www.archlinux.org/packages/">http://www.archlinux.org/packages/</a>
                    - enter the package name in the 'Keywords' box, select
                    the package name, select the 'Source Files' field, and
                    then select the <code class="filename">PKGBUILD</code>
                    entry to see how they build this package.
                  </p>
                </li>
                <li class="listitem">
                  <p>
                    Debian <a class="ulink" href=
                    "ftp://ftp.uk.debian.org/debian/pool">ftp://ftp.uk.debian.org/debian/pool</a>
                    (use your country's version if there is one) - the source
                    will be in .tar.gz tarballs (either the original upstream
                    <code class="filename">.orig</code> source, or else a
                    <code class="filename">dfsg</code> containing those parts
                    which comply with debian's free software guidelines)
                    accompanied by versioned .diff.gz or .tar.gz additions.
                    These additions often show how the package is built, and
                    may contain patches. In the .diff.gz versions, any
                    patches create files in <code class=
                    "filename">debian/patches</code>.
                  </p>
                </li>
                <li class="listitem">
                  <p>
                    Fedora package source gets reorganized from time to time.
                    At the moment the package source for rpms is at <a class=
                    "ulink" href=
                    "https://src.fedoraproject.org/projects/rpms/%2A">https://src.fedoraproject.org/projects/rpms/%2A</a>
                    and from there you can try putting a package name in the
                    search box. If the package is found you can look at the
                    files (specfile to control the build, various patches) or
                    the commits. If that fails, you can download an srpm
                    (source rpm) and using <span class=
                    "application">rpm2cpio</span> (see the Tip at the bottom
                    of the page). For rpms go to <a class="ulink" href=
                    "https://dl.fedoraproject.org/pub/fedora/linux/">https://dl.fedoraproject.org/pub/fedora/linux/</a>
                    and then choose which repo you wish to look at -
                    development/rawhide is the latest development, or choose
                    releases for what was shipped in a release, updates for
                    updates to a release, or updates/testing for the latest
                    updates which might work or might have problems.
                  </p>
                </li>
                <li class="listitem">
                  <p>
                    Gentoo - the mirrors for ebuilds and patches seem to be
                    well-hidden, and they change frequently. Also, if you
                    have found a mirror, you need to know which directory the
                    application has been assigned to. The ebuilds themselves
                    can be found at <a class="ulink" href=
                    "http://packages.gentoo.org/">http://packages.gentoo.org/</a>
                    - use the search field. If there are any patches, a
                    mirror will have them in the <code class=
                    "filename">files/</code> directory. Depending on your
                    browser, or the mirror, you might need to download the
                    ebuild to be able to read it. Treat the ebuild as a sort
                    of pseudo-code / shell combination - look in particular
                    for <span class="command"><strong>sed</strong></span>
                    commands and patches, or hazard a guess at the meanings
                    of the functions such as <span class=
                    "command"><strong>dodoc</strong></span>.
                  </p>
                </li>
                <li class="listitem">
                  <p>
                    openSUSE provide a rolling release, some package versions
                    are in <a class="ulink" href=
                    "http://download.opensuse.org/source/tumbleweed/repo/oss/src/">
                    http://download.opensuse.org/source/tumbleweed/repo/oss/src/</a>
                    but others are in ../update/openSUSE-current/src - the
                    source only seems to be available in source rpms.
                  </p>
                </li>
                <li class="listitem">
                  <p>
                    Slackware - the official package browser is currently
                    broken. The site at <a class="ulink" href=
                    "http://slackbuilds.org/">http://slackbuilds.org/</a> has
                    current and previous versions in their unofficial
                    repository with links to homepages, downloads, and some
                    individual files, particularly the <code class=
                    "filename">.SlackBuild</code> files.
                  </p>
                </li>
                <li class="listitem">
                  <p>
                    Ubuntu <a class="ulink" href=
                    "ftp://ftp.ubuntu.com/ubuntu/pool/">ftp://ftp.ubuntu.com/ubuntu/pool/</a>
                    - see the debian notes above.
                  </p>
                </li>
              </ul>
            </div>
            <p>
              If everything else fails, try the blfs-support mailing-list.
            </p>
          </li>
        </ul>
      </div>
      <div class="admon tip">
        <img alt="[Tip]" src="../images/tip.png" />
        <h3>
          Tip
        </h3>
        <p>
          If you have found a package that is only available in <code class=
          "filename">.deb</code> or <code class="filename">.rpm</code>
          format, there are two small scripts, <span class=
          "command"><strong>rpm2targz</strong></span> and <span class=
          "command"><strong>deb2targz</strong></span> that are available at
          <a class="ulink" href=
          "http://downloads.linuxfromscratch.org/deb2targz.tar.bz2">http://downloads.linuxfromscratch.org/deb2targz.tar.bz2</a>
          and <a class="ulink" href=
          "http://downloads.linuxfromscratch.org/rpm2targz.tar.bz2">http://downloads.linuxfromscratch.org/rpm2targz.tar.bz2</a>
          to convert the archives into a simple <code class=
          "filename">tar.gz</code> format.
        </p>
        <p>
          You may also find an rpm2cpio script useful. The Perl version in
          the linux kernel archives at <a class="ulink" href=
          "http://lkml.indiana.edu/hypermail/linux/kernel/0210.2/att-0093/01-rpm2cpio">
          http://lkml.indiana.edu/hypermail/linux/kernel/0210.2/att-0093/01-rpm2cpio</a>
          works for most source rpms. The rpm2targz script will use an
          rpm2cpio script or binary if one is on your path. Note that
          rpm2cpio will unpack a source rpm in the current directory, giving
          a tarball, a spec file, and perhaps patches or other files.
        </p>
      </div>
      <p class="updated">
        Last updated on 2020-02-06 17:43:11 -0600
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="locale-issues.html" title=
          "Locale Related Issues">Prev</a>
          <p>
            Locale Related Issues
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="../postlfs/postlfs.html" title=
          "Post LFS Configuration and Extra Software">Next</a>
          <p>
            Post LFS Configuration and Extra Software
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="important.html" title=
          "Chapter&nbsp;2.&nbsp;Important Information">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
